recompute Start Date
Recomputes the start date for a list of cash flows. The start date affects the result of an IRR computation the most, since every cash flow is computed against the start date. There are times when you should recompute the start date because it has been initially estimated, for example when the user picks 'All Dates' in a report and the start date defaults to 1970. This (for example) would make the IRR computation artificially low.
Where the start date has been estimated, or known to be wrong, call this method prior to calling IRR.computeIRR
Note: This function mutates the entries in cashFlows (i.e. start date and annums in period). Clone them first if shared elsewhere.
This function does the following:
if the list of cash flows is
nullor contains no entries, then no changes are made, and currentBeginDate is returnedcomputes the max (newest) date between the first cash flow entry's date and the supplied start date currentBeginDate (less 1 day).
if this computed max date and currentBeginDate and the first cash flow's start date are all the same then currentBeginDate is returned and no changes are made.
calls ROICashFlowEntry.setStartDate (via setCashFlowsStartDate) using the computed max date on all cashflows in the list.
Return
The new start date that was computed.
Parameters
The cash flow time series to recompute the start date for, sorted in ascending date order.
The current starting date.